// Demonstrate difference between prefix and postfix
// Written by John Johann Kim
// on Mon Jan  6 12:02:17 PST 2014
class PrePost {
    public static void main(String args[]) {
        int p, q;

        p = 1;
        q = 1;

        System.out.println("p: " + p);
        System.out.println("q: " + q + "\n");

        p = p++; q = ++q; 
        System.out.println("p++: " + p); // P doesn't look changed
        System.out.println("++q: " + q + "\n"); 
    }
}

